import request from '@/utils/request'

// 查询运费模版列表
export function listFreightTemplate(query) {
  return request({
    url: '/business/freightTemplate/list',
    method: 'get',
    params: query
  })
}

// 查询运费模版详细
export function getFreightTemplate(id) {
  return request({
    url: '/business/freightTemplate/' + id,
    method: 'get'
  })
}

// 新增运费模版
export function addFreightTemplate(data) {
  return request({
    url: '/business/freightTemplate',
    method: 'post',
    data: data
  })
}

// 修改运费模版
export function updateFreightTemplate(data) {
  return request({
    url: '/business/freightTemplate',
    method: 'put',
    data: data
  })
}

// 删除运费模版
export function delFreightTemplate(id) {
  return request({
    url: '/business/freightTemplate/' + id,
    method: 'delete'
  })
}

export function getCommonAreaList(parentId) {
  return request({
    url: '/sysCommonArea/getCommonArea/'+parentId,
    method: 'get',
  })
}